<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="button" value="按钮1" v-on:click="f()">
    <!-- 以下写法为上面的简写形式 -->
    <input type="button" value="按钮2" @click="ff()">
    {{info}}
</div>

    <script src="../js/vue.js"></script>
    <script>
        let v = new Vue({
            el:"div",
            data:{info:"事件绑定"},
            methods:{
                //第一种
                f:function () {
                    v.info = "按钮1点击了";
                },
                //第二种
                ff() {
                    v.info = "按钮2点击了";
                }
            }
        })
    </script>
</body>
</html>